package com.vchello.util;

import java.util.ResourceBundle;

/**
 * 
 * @author power
 *
 */
public class VchelloConfig {
	private final static String dbUrlKey = "db.url";
	private final static String dbDriverKey = "db.driver";
	private final static String dbPasswordKey = "db.password";
	private final static String dbUserNameKey = "db.username";
	private final static String environment = "environment";
	private final static String permisionCache = "permisionCache";
	private final static String isSendEmail = "isSendEmail";
	private final static String baseinfoCache = "baseinfoCache";
	private final static String webUrl = "WEBURL";
	private final static ResourceBundle systemConfig = ResourceBundle.getBundle("system");
	private final static ResourceBundle vchelloConfig = ResourceBundle.getBundle("vchelloConfig");
	// weixin start
	public static final String MENU_QUERY_URI = "MENU_QUERY_URI"; // weixin菜单查询接口
	public static final String MENU_SAVE_URI = "MENU_SAVE_URI"; // 微信菜单创建接口
	public static final String MENU_DELETE_URI = "MENU_DELETE_URI"; // 微信菜单删除接口
	public static final String MY_ACCESS_TOKEN_KEY = "MY_ACCESS_TOKEN_KEY";
	public static final String APPID = "APPID";// "wxd9cfdce06cfec1a6";
												// //微信appid
	public static final String SECRET = "SECRET";// "4edc3a1ebc5af4a3b011252def72b50f";
													// //微信secret
	
	public static final String XCXAPPID = "XCXAPPID";//小程序信appid 
	public static final String XCXAPPSECRET = "XCXAPPSECRET";//小程序appid 
	public static final String JSCODEURL = "JSCODEURL";//小程序URL 
	public static final String SERVICEAPPID = "SERVICEAPPID";//服务号微信appid 
	public static final String SERVICESECRET = "SERVICESECRET";//"4edc3a1ebc5af4a3b011252def72b50f";	//服务号微信secret 
	public static final String TOKEN_URL = "TOKEN_URL"; // 微信获取access_tooken地址
	public static final String CODE_ACCESS_TOKEN = "CODE_ACCESS_TOKEN"; // 通过code换取网页授权access_token(网页授权接口调用凭证,注意：此access_token与基础支持的access_token不同)
	public static final String JSAPI_TICKET_URL = "JSAPI_TICKET_URL"; // 微信获取JSAPI_TICKET_URL地址
	public static final String AUTHLOGIN = "AUTHLOGIN"; // 微信获取用户同意授权，获取code
	public static final String USERINFO = "USERINFO"; // 微信拉取用户信息(需scope为 snsapi_userinfo)
	public static final String MESSAGE_TEXT_URI = "MESSAGE_TEXT_URI"; // 微信发送消息接口uri
	public static final String TEMPLATE_MESSAGE_URL = "TEMPLATE_MESSAGE_URL";	 //创业者投递项目通知投资人消息模板ID
	// weixin end

	//GOEASY
	public static final String SUPER_KEY = "SUPER_KEY";
	public static final String AUTHORIZATION = "AUTHORIZATION";
	public static final String SEND_RETURN = "SEND_RETURN";
	public static final String CREATE_RETURN = "CREATE_RETURN";
	
	//Aliyun
	public static final String ALIYUN_APPKEY = "ALIYUN_APPKEY";
	public static final String ALIYUN_APPSECRET = "ALIYUN_APPSECRET";
	public static final String ALIYUN_APPCODE = "ALIYUN_APPCODE";
	public static final String BUSSCARD_URL = "BUSSCARD_URL";
	
	public static final String PATH = "PATH"; // 本地网址
	public static final String PATHURL = "FINDPASSWORD"; // 获取邮件找回密码URL
	
	public static final String FILE_URL = "FILE_URL";
	
	/**
	 * 发送网站地址
	 * @return
	 */
	public static String getWebURL(){
		String value = vchelloConfig.getString(webUrl);
		return value;
	}

	/**
	 * 获取邮件找回密码URL
	 * @return
	 */
	public static String getPasswordUrl(){
		String value = vchelloConfig.getString(PATHURL);
		return value;
		
	}
	
	/**
	 * 获取数据
	 * 
	 * @param key
	 * @return
	 */
	public static String getValue(String key) {
		String value = vchelloConfig.getString(key);
		return value;
	}
	
	public static String getFileUrl(){
		String value = vchelloConfig.getString(FILE_URL);
		return value;
	}

	public static String getPath() {
		String value = vchelloConfig.getString(PATH);
		return value;
	}

	public static String getMessageTextUrl() {
		String value = vchelloConfig.getString(MESSAGE_TEXT_URI);
		return value;
	}
	
	/**
	 * 获取小程序APPID
	 * @return
	 */
	public static String getXcxAppid(){
		String value = vchelloConfig.getString(XCXAPPID);
		return value;
	}
	
	/**
	 * 获取小程序Secret
	 * @return
	 */
	public static String getXcxSecret(){
		String value = vchelloConfig.getString(XCXAPPSECRET);
		return value;
	}
	/**
	 * 获取小程序URLE
	 * @return
	 */
	public static String getXcxUrl(){
		String value = vchelloConfig.getString(JSCODEURL);
		return value;
	}

	/**
	 * 微信查询url
	 * 
	 * @return
	 */
	public static String getMenuQueryUrl() {
		String value = vchelloConfig.getString(MENU_QUERY_URI);
		return value;
	}

	/**
	 * 微信自定义菜单保存url
	 * 
	 * @return
	 */
	public static String getMenuSaveUrl() {
		String value = vchelloConfig.getString(MENU_SAVE_URI);
		return value;
	}

	/**
	 * 微信删除自定义菜单url
	 * 
	 * @return
	 */
	public static String getMenuDeleteUrl() {
		String value = vchelloConfig.getString(MENU_DELETE_URI);
		return value;
	}

	/**
	 * 微信access token
	 * 
	 * @return
	 */
	public static String getWeixinAccessToken() {
		String value = vchelloConfig.getString(MY_ACCESS_TOKEN_KEY);
		return value;
	}

	/**
	 * appid
	 * 
	 * @return
	 */
	public static String getAppid() {
		String value = vchelloConfig.getString(APPID);
		return value;
	}
	
	/**SERVICEAPPID
	 * @return
	 */
	public static String getServiceAppid(){
		String value = vchelloConfig.getString(SERVICEAPPID);
		return value;
	}

	/**
	 * secret
	 * 
	 * @return
	 */
	public static String getSecret() {
		String value = vchelloConfig.getString(SECRET);
		return value;
	}
	
	/**secret
	 * @return
	 */
	public static String getServiceSecret(){
		String value = vchelloConfig.getString(SERVICESECRET);
		return value;
	}

	/**
	 * token验证url
	 * 
	 * @return
	 */
	public static String getTokenUrl() {
		String value = vchelloConfig.getString(TOKEN_URL);
		return value;
	}

	/**
	 * 通过code换取网页授权access_token(网页授权接口调用凭证,注意：此access_token与基础支持的access_token不同)
	 * 
	 * @return
	 */
	public static String getCodeAccessToken() {
		String value = vchelloConfig.getString(CODE_ACCESS_TOKEN);
		return value;

	}

	public static String getJsapiUrl() {
		String value = vchelloConfig.getString(JSAPI_TICKET_URL);
		return value;
	}
	
	/**
	 * Goeasy获取授权地址
	 * @return
	 */
	public static String getAuthorization() {
		String value = vchelloConfig.getString(AUTHORIZATION);
		return value;
	}
	
	/**
	 * Goeasy获取发送回调
	 * @return
	 */
	public static String getSendReturn() {
		String value = vchelloConfig.getString(SEND_RETURN);
		return value;
	}
	
	/**
	 * Goeasy获取创建回调
	 * @return
	 */
	public static String getCreateReturn() {
		String value = vchelloConfig.getString(CREATE_RETURN);
		return value;
	}
	
	/**
	 * Goeasy获取SuperKey
	 * @return
	 */
	public static String getSuperKey() {
		String value = vchelloConfig.getString(SUPER_KEY);
		return value;
	}

	/**
	 * aliyun获取appkey
	 * @return
	 */
	public static String getALIYUN_APPKEY() {
		String value = vchelloConfig.getString(ALIYUN_APPKEY);
		return value;
	}
	
	/**
	 * aliyun获取appsecret
	 * @return
	 */
	public static String getALIYUN_APPSECRET() {
		String value = vchelloConfig.getString(ALIYUN_APPSECRET);
		return value;
	}
	
	/**
	 * aliyun获取appcode
	 * @return
	 */
	public static String getALIYUN_APPCODE() {
		String value = vchelloConfig.getString(ALIYUN_APPCODE);
		return value;
	}
	
	/**
	 * aliyun获取名片识别url
	 * @return
	 */
	public static String getBUSSCARD_URL() {
		String value = vchelloConfig.getString(BUSSCARD_URL);
		return value;
	}
	
	/**
	 * 用户同意授权，获取code回调的url
	 * @return
	 */
	public static String getAuthLogin() {
		String value = vchelloConfig.getString(AUTHLOGIN);
		return value;
	}
	
	/**
	 * 拉取用户信息(需scope为 snsapi_userinfo)
	 * @return
	 */
	public static String getUserInfo(){
		String value = vchelloConfig.getString(USERINFO);
		return value;
	}

	/**
	 * 数据库url
	 * 
	 * @return
	 */
	public static String getDbUrl() {
		String value = systemConfig.getString(dbUrlKey);
		return value;
	}

	/**
	 * 数据库driver
	 * 
	 * @return
	 */
	public static String getDbDriver() {
		String value = systemConfig.getString(dbDriverKey);
		return value;
	}

	/**
	 * 数据库密码
	 * 
	 * @return
	 */
	public static String getDbPassword() {
		String value = systemConfig.getString(dbPasswordKey);
		return value;
	}

	/**
	 * 数据库用户名
	 * 
	 * @return
	 */
	public static String getDbUserName() {
		String value = systemConfig.getString(dbUserNameKey);
		return value;
	}

	/**
	 * pdf转为swf环境问题
	 * 
	 * @return
	 */
	public static String getEnvironment() {
		String value = vchelloConfig.getString(environment);
		return value;
	}

	/**
	 * 权限缓存名称
	 * 
	 * @return
	 */
	public static String getPermisionCacheName() {
		String value = vchelloConfig.getString(permisionCache);
		return value;
	}

	/**
	 * 是否开启发送邮箱
	 * 
	 * @return
	 */
	public static String getSendEmailStatus() {
		String value = vchelloConfig.getString(isSendEmail);
		return value;
	}

	/**
	 * 基础表缓存
	 * 
	 * @return
	 */
	public static String getBaseInfoCacheName() {
		// TODO Auto-generated method stub
		String value = vchelloConfig.getString(baseinfoCache);
		return value;
	}

	/**
	 * 发送模板消息url
	 * @return
	 */
	public static String getTemplateMessage(){
		String value = vchelloConfig.getString(TEMPLATE_MESSAGE_URL);
		return value;
	}
	

	
	/**
	 * 较真的加密秘钥
	 * @return
	 */
	public static String JZ_SECRET = "JZ_SECRET";
	public static String getJzSecret(){
		String value = vchelloConfig.getString(JZ_SECRET);
		return value;
	}

	
	/**
	 * 较真的ACCESSTOKEN
	 * @return
	 */
	public static String ACCESSTOKEN = "ACCESSTOKEN";
	public static String getAccessToken(){
		String value = vchelloConfig.getString(ACCESSTOKEN);
		return value;
	}
	
	/**
	 * 较真的请求地址
	 * @return
	 */
	public static String JZURL_REQUEST = "JZURL_REQUEST";
	public static String getJzurlRequest(){
		String value = vchelloConfig.getString(JZURL_REQUEST);
		return value;
	}
	
	/**
	 * 较真的回调地址
	 * @return
	 */
	public static String JZ_NOTIFY_URL = "JZ_NOTIFY_URL";
	public static String getJzNotifyUrl(){
		String value = vchelloConfig.getString(JZ_NOTIFY_URL);
		return value;
	}
	
	/**
	 * 支付宝公钥
	 * @return
	 */
	public static String ALIPAY_KEY = "ALIPAY_KEY";
	public static String getAlipayKey(){
		String value = vchelloConfig.getString(ALIPAY_KEY);
		return value;
	}
	/**
	 * 支付宝商户
	 * @return
	 */
	public static String ALIPAY_APPID = "ALIPAY_APPID";
	public static String getAlipayAppid(){
		String value = vchelloConfig.getString(ALIPAY_APPID);
		return value;
	}
	/**
	 * 支付宝通知回调地址
	 * @return
	 */
	public static String NOTIFY_URL = "NOTIFY_URL";
	public static String getNotifyUrl(){
		String value = vchelloConfig.getString(NOTIFY_URL);
		return value;
	}
	/**
	 * 支付宝网页跳转地址
	 * @return
	 */
	public static String RETURN_URL = "RETURN_URL";
	public static String getReturnUrl(){
		String value = vchelloConfig.getString(RETURN_URL);
		return value;
	}
	
	/**
	 * 支付宝请求地址
	 */
	public static String ALIPAY_GATEWAY_NEW= "ALIPAY_GATEWAY_NEW";
	public static String getAlipayGateway(){
		String value = vchelloConfig.getString(ALIPAY_GATEWAY_NEW);
		return value;
	}
	
	/**
	 * 支付宝请求地址
	 */
	public static String JZWEBSOCKET= "JZWEBSOCKET";
	public static String getJzWebSocket(){
		String value = vchelloConfig.getString(JZWEBSOCKET);
		return value;
	}
	
	/**
	 * 支付宝请求地址
	 */
	public static String RSA_PUBLIC_KEY= "RSA_PUBLIC_KEY";
	public static String getRsaPublicKey(){
		String value = vchelloConfig.getString(RSA_PUBLIC_KEY);
		return value;
	}
	
	/**
	 * 支付宝请求地址
	 */
	public static String RSA_PRIVATE_KEY= "RSA_PRIVATE_KEY";
	public static String getRsaPrivateKey(){
		String value = vchelloConfig.getString(RSA_PRIVATE_KEY);
		return value;
	}
}
